package com.wanxing.sellerapp.emqx.handlers

import com.alibaba.fastjson.JSONObject
import com.wanxing.sellerapp.emqx.entity.EmqPayload
import com.wanxing.sellerapp.emqx.interfaces.IMessenger
import com.wanxing.sellerapp.seller.SellerManager

class CloseDoorHandler(messenger: IMessenger, sellerManager: SellerManager) : AbstractActionHandler(messenger, sellerManager) {

    override fun handleAction(messageId: String?, data: JSONObject, payload: EmqPayload) {
        sellerManager.seller.closeDoor(data.getIntValue("doorNo"))
    }

}